/* SSH 密钥输入框样式 */
#id_ssh_key {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  font-family: monospace !important;
  margin-bottom: 10px !important;
  padding: 8px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  resize: vertical !important;
  background-color: #fff !important;
  color: #333 !important;
  line-height: 1.5 !important;
  font-size: 14px !important;
  transition: border-color 0.2s !important;
}

#id_ssh_key:focus {
  border-color: #79aec8 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(121, 174, 200, 0.2) !important;
}

/* 文件上传字段样式 */
#id_ssh_key_file {
  margin-bottom: 10px !important;
}

/* 文件上传按钮样式 */
.ssh-key-file-input-wrapper {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-ssh-key {
  margin-right: 10px;
  padding: 6px 12px;
  background-color: #79aec8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.select-ssh-key:hover {
  background-color: #609ab6;
}

/* 文件名显示样式 */
.ssh-key-file-name {
  color: #666;
  font-size: 13px;
  margin-left: 10px;
}

.ssh-key-file-name.success {
  color: #28a745;
}

/* 错误消息样式 */
.ssh-key-error {
  color: #ba2121;
  margin-top: 5px;
  font-size: 13px;
  padding: 8px;
  background-color: #fff0f0;
  border: 1px solid #ffcfcf;
  border-radius: 4px;
  margin-bottom: 10px;
  transition: opacity 0.5s;
}

/* 表单字段组样式 */
.form-row {
  margin-bottom: 15px;
}

.form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/* 帮助文本样式 */
.help {
  color: #666;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.ssh-key-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  background-color: var(--success-color);
  color: white;
}

.ssh-key-status:empty::before {
  content: '未配置';
  color: var(--body-quiet-color);
  background-color: transparent;
}

/* 文件上传按钮样式 */
input[type='file'] {
  margin-bottom: 10px;
}

/* 成功状态样式 */
#id_ssh_key[style*='border-color: rgb(40, 167, 69)'] {
  border-color: #28a745 !important;
}

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 4px;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #0056b3;
  color: white;
  text-decoration: none;
}

.delete-button {
  background-color: #dc3545;
}

.delete-button:hover {
  background-color: #c82333;
}

/* 操作按钮容器 */
#result_list td.field-get_action_buttons {
  white-space: nowrap;
  padding: 8px;
}

/* 同步状态样式 */
#result_list td.field-get_sync_status {
  font-weight: bold;
  padding: 8px;
}

/* 确保按钮在表格中正确显示 */
#result_list td {
  vertical-align: middle;
}

/* 按钮容器样式 */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}
